package com.bjpowernode.controller;

import com.bjpowernode.model.TProduct;
import com.bjpowernode.result.R;
import com.bjpowernode.service.ProductService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ProductController {

    @Resource
    private ProductService productService;

    @GetMapping(value = "/api/product/sale")
    public R saleProduct() {
        List<TProduct> tProductList = productService.getSaleProduct();

        return R.OK(tProductList);
    }
}
